Skip to content

JSON&Docker support#15

Merged
alex98247 merged 90 commits intomainfrom
deploy
Apr 2, 2025
Merged

JSON&Docker support#15
alex98247 merged 90 commits intomainfrom
deploy

Conversation

@f1i3g3
Copy link
Contributor

@f1i3g3 f1i3g3 commented Feb 20, 2025

Summary

Orchestration of project + support for configuration.

What's new?

  • added configuration parser (from json file)
  • added launch from docker file

@f1i3g3 f1i3g3 requested a review from alex98247 February 20, 2025 09:45
@f1i3g3 f1i3g3 marked this pull request as draft February 20, 2025 10:54
@f1i3g3 f1i3g3 changed the title [WiP] Added docker files [WiP] Docker support Feb 26, 2025
@f1i3g3 f1i3g3 changed the title [WiP] Docker support [WiP] JSON&Docker support Feb 26, 2025
@f1i3g3 f1i3g3 marked this pull request as ready for review February 27, 2025 11:44
@alex98247
Copy link
Contributor

Пайплайн упал

@alex98247
Copy link
Contributor

Надо еще валидацию сделать
Можно вдохновение словить тут https://github.com/freqtrade/freqtrade/blob/64e27637dcfb22576d53fa69f9627eb5e4817d5c/freqtrade/configuration/config_validation.py

@alex98247
Copy link
Contributor

Еще бы доку на конфигурацию. Что за параметры, за что отвечают на что влияют

Comment on lines 23 to 50
# TODO: solve type problem!!!!
@staticmethod
def _parse_json_class_list(resolver: IResolver, json_dicts_list: list[dict]):
class_list = list()

for json_dict in json_dicts_list:
class_name = json_dict.get("name")

class_params = json_dict.get("params")

class_ = resolver.load(name=class_name, params=class_params)
class_list.append(class_)

return class_list

@staticmethod
def _parse_json_class(resolver: IResolver, json_dict: dict):
class_name = json_dict["name"]

try:
class_params = json_dict["params"]
except KeyError:
class_params = None

class_ = resolver.load(name=class_name, params=class_params)

return class_

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alex98247, что мне здесь указать как выводимый тип (и потом упомянуть в документации)? Классы, которые распознаёт парсер, определяются динамически и никак между собой не связаны (можно, конечно, всунуть какой-нибудь интерфейс, но для распознавания критериев из отдельного пакета так не сделать).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавил промежуточный класс.

@f1i3g3 f1i3g3 changed the title [WiP] JSON&Docker support JSON&Docker support Apr 1, 2025
@f1i3g3 f1i3g3 requested a review from alex98247 April 1, 2025 13:14
This was linked to issues Apr 1, 2025
@f1i3g3 f1i3g3 added enhancement New feature or request python Pull requests that update python code labels Apr 1, 2025
@alex98247 alex98247 merged commit d930646 into main Apr 2, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dockerfile Configuration from config file

2 participants